from django.db import models

# Create your models here.
class OptimizeWorkList (models.Model):
    city = models.CharField(verbose_name='城市', blank=True, null=True, max_length=55)
    vendor_name = models.CharField(verbose_name='厂家', blank=True, null=True, max_length=50)
    add_succ = models.IntegerField(verbose_name='添加成功', blank=True, null=True)
    add_succ_Rate = models.IntegerField(verbose_name='添加成功率', blank=True, null=True)
    dele_succ = models.IntegerField(verbose_name='删除成功', blank=True, null=True)
    dele_succ_rate = models.IntegerField(verbose_name='删除成功率', blank=True, null=True)
    PCI_NUM = models.IntegerField(verbose_name='修改PCI', blank=True, null=True)
    Monitor = models.CharField(verbose_name='监控状态', blank=True, null=True, max_length=50)
    reserved1 = models.CharField(verbose_name='保留字段1', blank=True, null=True, max_length=100)
    reserved2 = models.IntegerField(verbose_name='保留字段2', blank=True, null=True)
    def __str__(self):  # 必须返回string
        return '{}'.format(self.vendor_name)

    class Meta:
        ordering = ['vendor_name']
        verbose_name = '工单统计汇总'
        verbose_name_plural = '工单统计汇总'
        db_table = 'ADJ_WORKLIST_COUNT'
